A kernel of an operating system (OS) is classified into a base kernel and a loadable kernel module (LKM).
The loadable kernel module provides at least one driver. When a driver in the loadable kernel module needs to be used, a file for implementing the loadable kernel module is temporarily loaded into a memory, and the file is run to implement the driver. When the file is run, another driver included in the loadable kernel module is also implemented.
Computer instructions and data for implementing all drivers in the loadable kernel module are stored in a same file. Therefore, in other approaches, an implementation of updating the loadable kernel module includes unloading an entire original loadable kernel module, and then loading a file for a new loadable kernel module into the memory. When a loadable kernel module is updated, a communications connection between the loadable kernel module and a service application is still disconnected even if a driver in the loadable kernel module is providing a driver service for the service application. Therefore, the service application cannot continue to send a service request for the driver service to the loadable kernel module, and consequently the driver service is terminated.